package com.auxiliary;

import java.util.ArrayList;
import java.util.HashMap;

/// <summary>
/// 景气信号灯灯号类
/// </summary>
public class SignalLampTimeSequence extends TimeSequence
{
    
    /// <summary>
    /// 景气信号灯颜色
    /// </summary>
//	public static final []String  = {"Red","Orange","Green","LightBlue","Blue","Other"};
	public static final String Red = "Red";
	public static final String Orange = "Orange";
	public static final String Green = "Green";
	public static final String LightBlue = "LightBlue";
	public static final String Blue = "Blue";
	public static final String Other = "Other";
    
    /// <summary>
    /// 红色灯号对应的数值
    /// </summary>
    public static final Double RED_VALUE = 10.0;
    /// <summary>
    /// 黄色灯号对应的数值
    /// </summary>
    public static final Double YELLOW_VALUE = 7.5;
    /// <summary>
    /// 绿色灯号对应的数值
    /// </summary>
    public static final Double GREEN_VALUE = 5.0;
    /// <summary>
    /// 浅蓝色灯号对应的数值
    /// </summary>
    public static final Double LIGNTBLUE_VALUE = 2.5;
    /// <summary>
    /// 蓝色灯号对应的数值
    /// </summary>
    public static final Double BLUE_VALUE = 0.0;
    /// <summary>
    /// 灯号和数值对应的序列
    /// </summary>
    protected HashMap<String,String> lampMap;
    /// <summary>
    /// 景气信号灯序列
    /// </summary>
    protected ArrayList<String> signalLampList;    

    /// <summary>
    /// 构造函数
    /// </summary>
    public SignalLampTimeSequence()
    {
    	lampMap = new HashMap<String,String>();
        signalLampList = new ArrayList<String>();
    }
    
    private String ConvertToSignalLamp(Double d)
    {
        if (d == RED_VALUE)
            return Red;
        if (d == YELLOW_VALUE)
            return Orange;
        if (d == GREEN_VALUE)
            return Green;
        if (d == LIGNTBLUE_VALUE)
            return LightBlue;
        if (d == BLUE_VALUE)
            return Blue;
        return Other;
    }

    /// <summary>
    /// 重载添加时间点数据
    /// </summary>
    /// <param name="dateString">表示时间点的字符串，如: 2007-06</param>
    /// <param name="value">上述时间点的某经济变量的取值</param>
    /// <returns>是否添加成功</returns>



    /// <summary>
    /// 得到时间序列信号灯数组
    /// </summary>
    /// <returns></returns>
    public ArrayList<String> GetSignalLamps()
    {
        ///modified by zhangxun,2007-8-7
        return signalLampList;
    }
  

    

}
